#ifndef AVALON_NULLCLIENTCONNECTION_HPP
#define AVALON_NULLCLIENTCONNECTION_HPP
#include "Avalon/IO/ClientConnection.hpp"
#include "Avalon/IOTests/IOTests.hpp"

namespace Avalon {
namespace IO {
namespace Tests {

  /** \class NullClientConnection
   *  \brief A ClientConnection that doesn't connect to any server.
   *  \author Kamal Mansouri <kranar@hotmail.com>
   */
  class NullClientConnection : public ClientConnection {
    public:

      //! Constructs a NullClientConnection.
      NullClientConnection();

      virtual ~NullClientConnection();

      virtual void Connect();

      virtual bool IsConnected();

      virtual void Close();

      virtual boost::signals2::connection ConnectClosedSignal(
        const ClosedSignal::slot_type& slot);

      virtual boost::signals2::connection ConnectClosedSignal(
        const ClosedSignal::slot_type& slot, bool* isConnected);

    private:
      boost::mutex m_mutex;
      bool m_isConnected;
      ClosedSignal m_closedSignal;
  };
}
}
}

#endif // AVALON_NULLCLIENTCONNECTION_HPP
